package se.webbzon.boltzmann.battle.round;

import se.webbzon.boltzmann.battle.battleaction.BattleAction;
import se.webbzon.boltzmann.battle.strategy.AbstractStrategy;
import se.webbzon.boltzmann.battle.strategy.StrategyListener;
import se.webbzon.oschi01.friendly.Friendly;

/** An implementation of a strategy listener. **/
@Friendly class BattleRoundStrategyListener implements StrategyListener {

	// The battle round associated with this listener
	private final BattleRound round;
	
	/*============================================================
	Constructors
	============================================================*/
	
	/** Creates a new strategy listener. **/
	@Friendly BattleRoundStrategyListener(BattleRound round) {
		this.round = round;
	}
	
	/*============================================================
	Public Methods
	============================================================*/

	@Override public void onSelect(AbstractStrategy strategy, BattleAction battleAction) {
		battleAction.addListener(new BattleRoundStrategyActionListener(round));
	}
	
}
